package com.gome.ocean.service.authority;

import com.github.pagehelper.Page;
import com.gome.ocean.common.exception.UserServiceException;
import com.gome.ocean.dao.model.authority.User;

/**
 * Created by liuqingxia on 2016/2/19.
 */
public interface UserService {

    /**
     * 新用户注册
     * 
     * @return
     */
    public boolean insertUser(User user) throws UserServiceException;

    /**
     * 根据email删除用户
     * 
     * @param email
     * @return
     */
    public boolean removeUser(String email) throws UserServiceException;

    /**
     * 根据id删除用户
     * 
     * @param id
     * @return
     */
    public boolean removeUser(Long id) throws UserServiceException;

    /**
     * 更新用户信息
     * 
     * @param user
     * @return
     */
    public boolean updateUser(User user) throws UserServiceException;

    /**
     * 查找所有的用户
     * 
     * @return
     */
    public Page<User> findAllUser(int pageNum, int pageSize) throws UserServiceException;

    /**
     * 根据id查询用户
     * 
     * @param id
     * @return
     */
    public User findUserById(Long id) throws UserServiceException;

    /**
     * 根据email查询用户
     * 
     * @param
     * @return
     */
    public User findUser(String email) throws UserServiceException;

}
